<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/views/global/taglibs.jsp"%>
<!DOCTYPE>
<html>
<head>
	<base href="<%=basePath %>">
	<title>${appName}</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	
	<%@include file="/views/global/include.jsp" %>
</head>
<body>
	<%@include file="/views/global/top.jsp" %>
	<form id="resourceForm" name="">
	<div class="main">
		<h3>Resource List</h3>
		<ul>
			<c:forEach items="${dataList }" var="item"><li>${item.name } <button type="button" class="btn btn-info" onclick="updateNode('${item.name}')">刷新</button> </li></c:forEach>
		</ul>
	</div>
	</form>
	<script type="text/javascript">
	function updateNode(resName){
			$("#resourceForm").goAjax({semantic: false,
				url: "/dev/resource/refresh",
				data:{resName:resName},
				success: function(jsonData) {
					if(true == jsonData.success){
	       				alert("刷新成功");
	       			} else {
	       				alert("刷新失败");
	       			}
				}
			});
	}
	</script>
</body>
</html>
